package com.ruoyi.web.controller.example;

import com.ruoyi.common.annotation.Anonymous;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Anonymous
@RestController
public class FirstController {
    @Value("${ruoyi.name}") //获取application中的配置
    private String ruoYiName;
    @Value("${ruoyi.version}")
    private String ruoyiVersion;
    @Value("${student.sno}")
    private String sno;
    @Value("${student.name}")
    private String name;

    @GetMapping("/hello")
    public String Hello() {
        return "若依的名称是：" + ruoYiName + "若依的版本是：" +ruoyiVersion +
                "我的学号是:" + sno + "我的姓名是" + name;
    }
}

